// 创建一个 mixins 对象
import {
  mapGetters
} from 'vuex'
export default {
  computed: {
    ...mapGetters('cart', ['total'])
  },
  onShow() {
    uni.setTabBarBadge({
      index: 2,
      text: this.total + ''
    })
  }
}

